/PROG  PNS0006
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0249454/2888";
PROG_SIZE	= 3406;
CREATE		= DATE 22-06-15  TIME 08:46:06;
MODIFIED	= DATE 24-11-08  TIME 11:29:18;
FILE_NAME	= PNS0070;
VERSION		= 0;
LINE_COUNT	= 124;
MEMORY_SIZE	= 3854;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0006 ;
   7:  !  PART:P0249454/2888  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  27:   ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED           ] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:   ;
  53:  WAIT DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON    ;
  54:   ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5:SPEED           ] ;
  57:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[2] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT30 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  64:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  68:   ;
  69:   ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  71:   ;
  72:   ;
  73:  LBL[30:GOTO DROP POUNCE] ;
  74:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  75:   ;
  76:  TIMER[3]=STOP ;
  77:  LBL[40:AT DROP POUNCE] ;
  78:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  79:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  80:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  81:  JMP LBL[40] ;
  82:   ;
  83:  LBL[50:MOVE DROP SNEAK] ;
  84:  TIMER[3]=START ;
  85:  OVERRIDE=R[5:SPEED           ] ;
  86:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  87:  LBL[51:DROP OR C-P-S] ;
  88:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  89:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  90:  JMP LBL[51] ;
  91:  JMP LBL[50] ;
  92:   ;
  93:  LBL[60:MOVE CLS-PRS-ACC] ;
  94:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  95:  PAUSE ;
  96:  JMP LBL[30] ;
  97:   ;
  98:  LBL[80:DROP ENABLED] ;
  99:  TIMER[3]=START ;
 100:  !PROCEED TO DROP ;
 101:  OVERRIDE=R[5:SPEED           ] ;
 102:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
 103:  MONITOR END Z_CHECH ;
 104:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 105:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 106:  PAYLOAD[1] ;
 107:  CALL CHK_DROP    ;
 108:   ;
 109:J P[12:DROP DEPART] 100% CNT100 ACC130 TA    .20sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 110:  //DO[7:PRESS STAMPING START]=PULSE,1.0sec ;
 111:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 112:  !GOTO PICK POUNCE ;
 113:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 114:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 115:  JMP LBL[10] ;
 116:   ;
 117:  LBL[90:END OF CYCLE] ;
 118:  TIMER[1]=STOP ;
 119:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 120:  MONITOR END MON_PICK ;
 121:J P[1:MIDDLE] 50% CNT100    ;
 122:  MOVE TO HOME    ;
 123:   ;
 124:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1220.621  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2144.163  mm,	Y =  1570.465  mm,	Z =  -985.796  mm,
	W =   179.557 deg,	P =     -.140 deg,	R =   145.152 deg,
	E1=   137.690 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2624.972  mm,	Y =  3213.159  mm,	Z = -1066.758  mm,
	W =  -178.550 deg,	P =    -1.073 deg,	R =    90.177 deg,
	E1=   194.031 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2624.830  mm,	Y =  3213.051  mm,	Z = -1217.130  mm,
	W =  -178.550 deg,	P =    -1.073 deg,	R =    90.177 deg,
	E1=   194.031 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2625.661  mm,	Y =  3213.692  mm,	Z = -1036.981  mm,
	W =  -178.551 deg,	P =    -1.074 deg,	R =    90.178 deg,
	E1=   194.031 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2194.811  mm,	Y =  1841.148  mm,	Z =  -848.587  mm,
	W =   179.557 deg,	P =     -.217 deg,	R =   138.451 deg,
	E1=   144.399 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2105.002  mm,	Y = -1228.558  mm,	Z =  -838.334  mm,
	W =   179.878 deg,	P =      .154 deg,	R =  -152.420 deg,
	E1=    75.171 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2402.910  mm,	Y = -2401.804  mm,	Z =  -970.423  mm,
	W =  -179.331 deg,	P =      .701 deg,	R =  -116.576 deg,
	E1=    41.490 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.087  mm,	Y = -3269.536  mm,	Z = -1074.718  mm,
	W =  -179.735 deg,	P =      .419 deg,	R =   -86.214 deg,
	E1=    10.432 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.085  mm,	Y = -3269.536  mm,	Z = -1200.319  mm,
	W =  -179.735 deg,	P =      .419 deg,	R =   -86.214 deg,
	E1=    10.432 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.085  mm,	Y = -3269.536  mm,	Z = -1091.518  mm,
	W =  -179.735 deg,	P =      .419 deg,	R =   -86.214 deg,
	E1=    10.432 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2174.013  mm,	Y = -1643.608  mm,	Z =  -991.326  mm,
	W =   179.913 deg,	P =      .135 deg,	R =  -142.543 deg,
	E1=    65.281 deg
};
/END
